<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%option explicit%>
<%
Dim RZ_IN
RZ_IN=1
%>
<!--#include file="../conn.inc.asp" -->
<!--#include file="admin_inc/admin.function.asp" -->
<!--#include file="admin_inc/admin.sqlfunction.asp" -->
<!-- #include file="fckeditor.asp" -->
<%
'作者：山林客（ah_bill）
'博客：http://ruizhinet.blog.163.com
'网站：http://www.ruizhinet.cn
'本信息不会影响您网站的正常访问，请保留
checkadmin(1)
dim id,typeid,addtime,author,title,content,orders,path,specialid,visible,rsa,sqla,lang,linkurl,keyword
id=GetIntQueryString("id")
typeid=GetIntQueryString("typeid")
S_LANG=GetIntQueryString("lang")
addtime=Now()
author=Session("user_name")
visible=1
If id>0 then
	Set rsa = Server.CreateObject("ADODB.Recordset")
	sqla = "select * from [c_article] where id="&id
	rsa.open sqla,conn,1,1
	If rsa.eof Or rsa.bof Then 
		response.redirect("showmsg.asp?from=article_list.asp&msg=NoRecord")
	else
		title=rsa("title")
		content=rsa("content")
		author=rsa("author")
		typeid=rsa("typeid")
		orders=rsa("orders")
		path=rsa("path")
		specialid=rsa("specialid")
		addtime=rsa("addtime")
		S_LANG=rsa("lang")
		visible=rsa("visible")
		linkurl=rsa("linkurl")
		keyword=rsa("keyword")
	End If 
	rsa.close
	Set rsa=Nothing 
End If
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><%out("lang_addarticle")%></title>
<link type="text/css" href="style/style.css" rel="stylesheet" rev="stylesheet"/>
<script type="text/javascript" src="admin_js/dateselect.js"></script>
<script type="text/javascript" src="admin_js/common.js"></script>
</head>
<body>
<form method="post" name="rzform" action="article_save.asp">
<%if id>0 then%>
<input type="hidden" name="act" value="modifysave"/>	
<input type="hidden" name="id" value="<%=id%>"/>
<%else%>
<input type="hidden" name="act" value="addsave"/>	
<%end if%>
<input type="hidden" name="author" style="color:gray" value="<%=author%>" readonly="true"/>
<input type="hidden" name="lang" value="<%=S_LANG%>"/>	
<table  class="table_800" cellspacing="0" cellpadding="0">
<tr>
	<th colspan="2">
	<%out("lang_addarticle")%>
	</th>
</tr>
<tr  class="row">
	<td width="80"><%out("lang_title")%></td>
	<td><input type="text" name="title" id="title" size="80" value="<%=title%>"/><span style="color:red;">*</span></td>
</tr>
<tr  class="row">
	<td><%out("lang_protities")%></td>
	<td><%out("lang_category")%>
	<select name="upper" id="upper">
	<%Call ShowTypeOptions("add_modify_article",typeid,"","",1,1)%>
	</select>
	&nbsp;&nbsp;<%out("lang_special")%><select name="specialid">
	<option value="0"><%out("lang_top_none")%></option>
	<%Call ShowSpecialOption(specialid)%>	
	</select>
	&nbsp;&nbsp;<%out("lang_top")%><select name="orders">
	<option value="0"  <%If orders=0 Then response.write(" selected") End If %>><%out("lang_top_none")%></option>
	<option value="1"  <%If orders=1 Then response.write(" selected") End If %>><%out("lang_top_level1")%></option>
	<option value="2"  <%If orders=2 Then response.write(" selected") End If %>><%out("lang_top_level2")%></option>
	</select><%out("lang_top_tips")%>&nbsp;&nbsp;<input type="checkbox" id="visible" name="visible" value="0" <%If visible=0 then%>checked<%End If %>/><%out("lang_visible")%>
	</td>
</tr>
<tr  class="row">
<td><%out("lang_content")%><span style="color:red;">*</span></td>
<td>
<%
Dim sBasePath
sBasePath = Request.ServerVariables("PATH_INFO")
sBasePath = Left( sBasePath, InStrRev( sBasePath, "/" ) )
Dim oFCKeditor
Set oFCKeditor = New FCKeditor
oFCKeditor.BasePath	= sBasePath
oFCKeditor.Config("ImageBrowser") = "true" 
oFCKeditor.Value	= content
oFCKeditor.Create "content"
%>
</td>
</tr>
<tr  class="row">
	<td><%out("lang_keyword")%></td>
	<td><input type="text" name="keyword" id="keyword" size="40" value="<%=keyword%>" maxlength="100"/><%out("lang_keywordtips")%></td>
</tr>
<tr  class="row">
	<td><%out("lang_linkurl")%></td>
	<td><input type="text" name="linkurl" id="linkurl" size="80" value="<%=linkurl%>" maxlength="200"/><%out("lang_linkurltips")%>&nbsp;&nbsp;<input type="checkbox" id="makehtml" name="makehtml" value="1"/><%out("lang_makehtml")%></td>
</tr>
<tr  class="row">
	<td colspan="2" class="tdcenter"><input  type="button" class="btn" onclick="checkForm('addarticle');" value="<%out("lang_save")%>">&nbsp;&nbsp;&nbsp;<input class="btn" type="reset" value="<%out("lang_reset")%>"></td>
</tr>
</table>
</form>
</body>
</html>